<!-- below add script for angularJS -->
<?php
$appName = get_class(Blyn::app()->getActiveApp());
$fileName = yii::app()->getBasePath(TRUE) . '/../angular/client/src/' . $appName . '/js/app.js';
if (file_exists($fileName)) {
    $aFolder = yii::app()->getBasePath(TRUE) . '/../angular/client/src/' . $appName . '/js';
    $list = scandir($aFolder);
    foreach ($list as $file) {
        if (strpos($file, '.js')) {
            //add script for angular
            $scriptFile = '<script type="text/javascript" src="' . yii::app()->request->getBaseUrl() . '/angular/client/src/' . $appName . '/js/' . $file . '"></script>';
            echo $scriptFile;
        }
    }
}
?>
